def repeater(value):
    while True:
        new = (yield value)
        if new is not None:
            value = new


r = repeater(42)
print(next(r))

r.send("Hello, world!")
print(next(r))
print(next(r))
